/***************************************************************************
 *   Copyright (C) 2009 by Bernhard Neuhofer   *
 *   mail@bneu.at   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/




#ifndef INQUEUE_H
#define INQUEUE_H
#include "message.h"
/**
* @brief Defines methods every InQueue has to implement.
*/
class InQueue
{
public:

/**
 * Removes all messages which occured before gvt
 * @param gvt The global virtual time
 */
virtual void fossilCollect(double gvt)=0;

/**
 *  Returns the time to which this queue/channel has proceeded.
 * @return The channel time
 */
virtual double getChannelTime()=0;

/**
 * Returns the last read message
 * @return Message *
 */
virtual Message* getLastRead()=0;

/**
 * Returns the next unread message.
 * @return Message *
 */
virtual Message* getNextUnread()=0;

/**
 * Sets the last read message.
 * @param message The last read  message
 */
virtual void setLastRead(Message* message)=0;

/**
 * Returns true if the queue contains more unread messages
 * @return bool
 */
virtual bool containsUnread()=0;

};

#endif